home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-08-10 | 5.0 KB | 230 lines | [TEXT/MPS ] |
- (*
- File: SFNTTypes.mod
-
- Contains: Font file structures.
-
- Version: Technology: Quickdraw GX 1.1
- Package: Universal Interfaces 2.1ß1 in “MPW Prerelease” on ETO #17
-
- Copyright: © 1984-1995 by Apple Computer, Inc.
- All rights reserved.
-
- Bugs?: If you find a problem with this file, use the Apple Bug Reporter
- stack. Include the file and version information (from above)
- in the problem description and send to:
- Internet: apple.bugs.applelink.apple.com
- AppleLink: APPLE.BUGS
-
- *)
-
- (*$TAGS-*)
- (*$CALLING PASCAL*)
- MODULE SFNTTypes;
-
- IMPORT SYSTEM, Types, GXTypes;
-
- (* $PUSH*)
- (* $ALIGN MAC68K*)
- (* $LibExport+*)
-
- TYPE
- sfntDirectoryEntry* = RECORD
- tableTag*: GXTypes.gxFontTableTag;
- checkSum*: LONGINT;
- offset*: LONGINT;
- length*: LONGINT;
- END;
-
- (* The search fields limits numOffsets to 4096. *)
- sfntDirectory* = RECORD
- format*: GXTypes.gxFontFormatTag;
- numOffsets*: INTEGER; (* number of tables *)
- searchRange*: INTEGER; (* (max2 <= numOffsets)*16 *)
- entrySelector*: INTEGER; (* log2(max2 <= numOffsets) *)
- rangeShift*: INTEGER; (* numOffsets*16-searchRange*)
- table*: ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF sfntDirectoryEntry; (* table[numOffsets] *)
- END;
-
-
- CONST
- sizeof_sfntDirectory* = 12;
-
- (* Cmap - character id to glyph id gxMapping *)
- cmapFontTableTag* = LONG("cmap");
-
-
- TYPE
- sfntCMapSubHeader* = RECORD
- format*: INTEGER;
- length*: INTEGER;
- languageID*: INTEGER; (* base-1 *)
- END;
-
-
- CONST
- sizeof_sfntCMapSubHeader* = 6;
-
-
- TYPE
- sfntCMapEncoding* = RECORD
- platformID*: INTEGER; (* base-0 *)
- scriptID*: INTEGER; (* base-0 *)
- offset*: LONGINT;
- END;
-
-
- CONST
- sizeof_sfntCMapEncoding* = 8;
-
-
- TYPE
- sfntCMapHeader* = RECORD
- version*: INTEGER;
- numTables*: INTEGER;
- encoding*: ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF sfntCMapEncoding;
- END;
-
-
- CONST
- sizeof_sfntCMapHeader* = 4;
-
- (* Name table *)
- nameFontTableTag* = LONG("name");
-
-
- TYPE
- sfntNameRecord* = RECORD
- platformID*: INTEGER; (* base-0 *)
- scriptID*: INTEGER; (* base-0 *)
- languageID*: INTEGER; (* base-0 *)
- nameID*: INTEGER; (* base-0 *)
- length*: INTEGER;
- offset*: INTEGER;
- END;
-
-
- CONST
- sizeof_sfntNameRecord* = 12;
-
-
- TYPE
- sfntNameHeader* = RECORD
- format*: INTEGER;
- count*: INTEGER;
- stringOffset*: INTEGER;
- rec*: ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF sfntNameRecord;
- END;
-
-
- CONST
- sizeof_sfntNameHeader* = 6;
-
- (* Fvar table - gxFont variations *)
- variationFontTableTag* = LONG("fvar");
-
- (* These define each gxFont variation *)
-
- TYPE
- sfntVariationAxis* = RECORD
- axisTag*: GXTypes.gxFontVariationTag;
- minValue*: Types.Fixed;
- defaultValue*: Types.Fixed;
- maxValue*: Types.Fixed;
- flags*: INTEGER;
- nameID*: INTEGER;
- END;
-
-
- CONST
- sizeof_sfntVariationAxis* = 20;
-
- (* These are named locations in gxStyle-space for the user *)
-
- TYPE
- sfntInstance* = RECORD
- nameID*: INTEGER;
- flags*: INTEGER;
- coord*: ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF Types.Fixed; (* [axisCount] *)
- (* room to grow since the header carries a tupleSize field *)
- END;
-
-
- CONST
- sizeof_sfntInstance* = 4;
-
-
- TYPE
- sfntVariationHeader* = RECORD
- version*: Types.Fixed; (* 1.0 Types.Fixed *)
- offsetToData*: INTEGER; (* to first axis* = 16*)
- countSizePairs*: INTEGER; (* axis+inst* = 2 *)
- axisCount*: INTEGER;
- axisSize*: INTEGER;
- instanceCount*: INTEGER;
- instanceSize*: INTEGER;
- (* …other <count,size> pairs *)
- axis*: ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF sfntVariationAxis; (* [axisCount] *)
- instance*: ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF sfntInstance; (* [instanceCount] …other arrays of data *)
- END;
-
-
- CONST
- sizeof_sfntVariationHeader* = 16;
-
- (* Fdsc table - gxFont descriptor *)
- descriptorFontTableTag* = LONG("fdsc");
-
-
- TYPE
- sfntDescriptorHeader* = RECORD
- version*: Types.Fixed; (* 1.0 in Types.Fixed *)
- descriptorCount*: LONGINT;
- descriptor*: ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF GXTypes.gxFontDescriptor;
- END;
-
-
- CONST
- sizeof_sfntDescriptorHeader* = 8;
-
- (* Feat Table - layout feature table *)
- featureFontTableTag* = LONG("feat");
-
-
- TYPE
- sfntFeatureName* = RECORD
- featureType*: INTEGER;
- settingCount*: INTEGER;
- offsetToSettings*: LONGINT;
- featureFlags*: INTEGER;
- nameID*: INTEGER;
- END;
-
- sfntFontRunFeature* = RECORD
- featureType*: INTEGER;
- setting*: INTEGER;
- END;
-
- sfntFeatureHeader* = RECORD
- version*: LONGINT; (* 1.0 *)
- featureNameCount*: INTEGER;
- featureSetCount*: INTEGER;
- reserved*: LONGINT; (* set to 0 *)
- names*: ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF sfntFeatureName;
- settings*: ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF GXTypes.gxFontFeatureSetting;
- runs*: ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF sfntFontRunFeature;
- END;
-
- (* OS/2 Table *)
-
- CONST
- os2FontTableTag* = LONG("OS/2");
-
- (* Special invalid glyph AIFF.ID value, useful as a sentinel value, for example *)
- nonGlyphID* = 65535;
-
-
- (* $ALIGN RESET*)
- (* $POP*)
-
- END SFNTTypes.
-